package com.diy.sigmund.diycommon.designpatterns.factorymethod.pizza1;


/**
 * @author ylm-sigmund
 * @since 2022/1/17 15:55
 */
public abstract class PizzaStore {

    public Pizza orderPizza(String type) {
        Pizza pizza = createPizza(type);

        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();

        return pizza;
    }

    protected abstract Pizza createPizza(String type);

}
